package com.course_design.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.course_design.entity.Rule;
import com.course_design.service.RuleService;

@Controller
public class RuleController {
	@Autowired
	private RuleService ruleService;
	@RequestMapping("/queryRule")
	@ResponseBody
	public Msg queryRule() {
		List<Rule> rules=ruleService.queryAllRule();
		return Msg.success("OK").add("rules",rules);
	}
	
}
